package com.ip.user.util;

import com.ip.user.models.bo.UserBO;
import com.ip.user.models.dto.UserRegisterDTO;
import com.ip.user.models.vo.UserVO;

/**
 * 对象转换工具类
 */
public class ConverterUtil {
    
    /**
     * 将UserRegisterDTO转换为UserBO
     */
    public static UserBO userRegisterDTOToUserBO(UserRegisterDTO userRegisterDTO) {
        if (userRegisterDTO == null) {
            return null;
        }
        
        UserBO userBO = new UserBO();
        userBO.setUserName(userRegisterDTO.getUserName());
        userBO.setRealName(userRegisterDTO.getRealName());
        userBO.setIdCard(userRegisterDTO.getIdCard());
        userBO.setPassword(userRegisterDTO.getPassword());
        userBO.setPhone(userRegisterDTO.getPhone());
        userBO.setEmail(userRegisterDTO.getEmail());
        
        return userBO;
    }
}